<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://unpkg.com/vue@next"></script>
  <style>
    .active {
      color: red;
    }
  </style>
</head>
<body>
  <div id="app">
    <async-example></async-example>
  </div>

  <script>
    const app = Vue.createApp({})
    const AsyncComp = Vue.defineAsyncComponent(() => {
      new Promise((resolve, reject) => {
        resolve({
          template: '<div>I am async</div>'
        })
      })
    })

    app.component('async-example', AsyncComp)

    app.mount('#app')
  </script>
</body>
</html>